package o;

import android.content.Context;
import android.text.TextUtils;
import androidx.annotation.NonNull;
import com.huawei.hmf.annotation.ApiDefine;
import com.huawei.hmf.annotation.Singleton;
import o.bor.b;

@ApiDefine(uri = bod.class)
@Singleton
public class boe implements bod {
    private boolean ˋ = false;

    public void ˊ(Context context, boh o_boh) {
        boc.ˎ.ˋ("DynamicCoreApiImpl", "Enter initialize.");
        if (!this.ˋ) {
            this.ˋ = true;
            if (ContentManager.getInstant().getContext() == null && context != null) {
                ContentManager.build(context);
            }
            bof.ˏ(o_boh);
            new Thread(new 4(this)).start();
        }
    }

    private void ˋ() {
        bor.ˎ().ˋ();
        boc.ˎ.ˋ("DynamicCoreApiImpl", "agreement is signed: " + ccx.ॱ());
        bor.ˎ().ˎ(ˏ());
        cdw.ˋ().ˋ(5, bog.class);
    }

    public void ˊ(int i) {
        boc.ˎ.ˋ("DynamicCoreApiImpl", "Enter triggerDeferredTaskAll, eventType: " + i);
        bor.ˎ().ˎ(ˏ());
        bor.ˎ().ˎ(i);
    }

    public void ˎ(String str) {
        boc.ˎ.ˋ("DynamicCoreApiImpl", "Enter clearTaskByPackageName, pkgName: " + str);
        if (!TextUtils.isEmpty(str)) {
            bor.ˎ().ˊ(str, ˏ());
        }
    }

    public void ˎ() {
        boc.ˎ.ˋ("DynamicCoreApiImpl", "Enter clearTaskAll.");
        bor.ˎ().ˏ(ˏ());
    }

    private static b ˏ() {
        return new b() {
            public void ॱ(@NonNull bol o_bol) {
                if (o_bol.ʼ()) {
                    bpi.ˎ().ˎ(o_bol.ˏ());
                }
                bof.ˏ().ˋ(o_bol.ʽ());
                bof.ˋ().ˏ(o_bol.ॱॱ(), o_bol.ˋ());
            }
        };
    }
}
